package com.ruoyi.system.api;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.config.FeignConfig;
import com.ruoyi.system.api.factory.RemoteQYLoginFallbackFactory;
import com.ruoyi.system.api.factory.RemoteQYMessageFallbackFactory;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;

/**
 * 企业微信接口
 *
 * @author ruoyi
 */
@FeignClient(contextId = "remoteQYMessageService",name = "remoteQYMessageService",url = "${go_wx_url}", fallbackFactory = RemoteQYMessageFallbackFactory.class, configuration = FeignConfig.class)
public interface RemoteQYMessageService
{

    /**
     *发送业务请求
     *
     */
    @PostMapping(value = "/open/GuidRequest", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send(@RequestBody HashMap<String, Object>  map);
    /**
     * 发送文本消息
     */
    @PostMapping(value = "/msg/send_text", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String send_text(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     * 发送群@消息
     */
    @PostMapping(value = "/msg/send_room_at", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String send_room_at(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
  /**
     * 发送语音消息
     */
    @PostMapping(value = "/msg/send_voice", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String send_voice(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

  /**
     * 发送位置消息
     */
    @PostMapping(value = "/msg/send_location", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String send_location(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
 /**
     *发送图片消息
     */
    @PostMapping(value = "/msg/send_image", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
     String send_image(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送文件消息
     */
    @PostMapping(value = "/msg/send_file", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_file(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送视频消息
     */
    @PostMapping(value = "/msg/send_video", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_video(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送大视频消息
     */
    @PostMapping(value = "/msg/send_big_video", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_big_video(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送Gif消息
     */
    @PostMapping(value = "/msg/send_gif", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_gif(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送Gif消息，url用/cloud/add_image上传
     */
    @PostMapping(value = "/msg/send_gif_url", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_gif_url(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送名片
     */
    @PostMapping(value = "/msg/send_personal_card", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_personal_card(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送链接
     */
    @PostMapping(value = "/opensss/", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_link(@RequestBody HashMap<String, Object>  map);
    /**
     *发送小程序
     */
    @PostMapping(value = "/xxx", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_weapp(@RequestBody HashMap<String, Object>  map);
    /**
     *发送视频号
     */
    @PostMapping(value = "/", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_feed_video(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

    /**
     *获取语音消息翻译id
     */
    @PostMapping(value = "/msg/apply_voice_id", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String apply_voice_id(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

    /**
     *获取语音消息翻译结果
     */
    @PostMapping(value = "/msg/query_voice_text", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String query_voice_text(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *确认企微内部消息已读
     */
    @PostMapping(value = "/msg/confirm_msg", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String confirm_msg(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *撤回消息
     */
    @PostMapping(value = "/msg/revoke_msg", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String revoke_msg(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *标记会话已读
     */
    @PostMapping(value = "/msg/report_unread", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String report_unread(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
    /**
     *发送聊天合集（合并转发）
     */
    @PostMapping(value = "/msg/send_forward_msg", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_forward_msg(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

    /**
     *发送视频号直播
     */
    @PostMapping(value = "/msg/send_feed_live", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_feed_live(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

    /**
     *发送引用消息
     */
    @PostMapping(value = "/msg/send_quote_msg", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_quote_msg(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);

    /**
     *发送微信小店商品信息
     */
    @PostMapping(value = "/msg/send_finder_product", consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    String send_finder_product(@RequestBody HashMap<String, List<HashMap<String,Object>>>  map);
}
